Other backends take care of the cairo surface destruction in
GdkWindow::destroy. We must do the same here, or the cairo_surface
and its corresponding wl_buffer are left dangling.
https://bugzilla.gnome.org/show_bug.cgi?id=747295
{
GdkWaylandCairoSurfaceData *data = p;
+ g_print ("EHMMMM...\n");
+
if (data->buffer)
wl_buffer_destroy (data->buffer);
data->scale = scale;
data->busy = FALSE;
+ g_print ("create shm surface...\n");
+
stride = width * 4;
data->pool = create_shm_pool (display->shm,
gdk_wayland_window_hide_surface (window);
if (impl->cairo_surface)
- cairo_surface_finish (impl->cairo_surface);
+ {
+ cairo_surface_finish (impl->cairo_surface);
+ cairo_surface_destroy (impl->cairo_surface);
+ impl->cairo_surface = NULL;
+ }
}
static void